﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Backend/Backend.Master"
    Inherits="System.Web.Mvc.ViewPage<IntroduceCompany.AnswerView>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    AnswerEdit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<!-- Begin one column tab content window -->
    <div class="onecolumn">
        <div class="header">
            <span>Chỉnh Sửa Câu Hỏi</span>
            <div class="switchbutton">
                <a href="<%= Url.Action("AnswerCreate", "Survey", new { questionID = Model.QuestionID }) %>" class="button">Thêm mới câu trả lời</a>
                <a href="<%= Url.Action("AnswerList", "Survey", new { questionID = Model.QuestionID }) %>" class="button">Danh sách câu trả lời</a>
            </div>
        </div>
        <br class="clear" />
        <div class="content">
            <div class="display-label error">
                <div class="errorcontent">
                    <p><%= Html.ValidationMessage("NoticePage")%></p>
                    <p><%= Html.ValidationMessageFor(model => model.AnswerContent) %></p>
                </div>
            </div>

            <div>
                <% using (Html.BeginForm("AnswerEdit", "Survey")){%>
                    <div class="editor_left">
                        <label>Ngôn ngữ:</label><br />
                        <%= Html.DropDownList("LanguageID", (SelectList)ViewData["LaguageList"], new { @style = "width:300px;", onchange = "this.form.submit();" })%>
                        <%= Html.HiddenFor(model => model.AnswerID) %>
                    </div>
                <%} %>
                <div class="editor_middle">
                    <br /><label>Số người chọn:</label>
                    <%= Model.ChoosenAmount %>
                </div>
            </div><br class="clear"/><br />

            <% using (Html.BeginForm("AnswerEditSubmit", "Survey", FormMethod.Post)){%>
                <%= Html.AntiForgeryToken(IntroduceCompany.Util.AntiKey.EditSalt)%>
                <%= Html.ValidationSummary(true) %>

                <div>
                    <label>Nội dung:</label><br />
                    <%= Html.TextBoxFor(model => model.AnswerContent, new { Maxlength = "4000"})%>
                </div><br class="clear"/><br />
    
                <div>
                    <div class="editor_left">
                        <label>Ngày tạo:</label>
                        <%= IntroduceCompany.Util.GeneralClass.ConvertDate_1C(Model.AnswerCreateDate.ToString())  %>
                    </div>
                    <div class="editor_middle width_middle">
                        <label>Lần chỉnh sửa cuối:</label>
                        <%= IntroduceCompany.Util.GeneralClass.ConvertDate_1C(Model.AnswerUpdateDate.ToString())  %>
                    </div>
                    <div class="editor_right">
                        <label>Người chỉnh sửa cuối:</label>
                        <%= Html.Encode(Model.FullName) %>
                    </div>
                </div><br class="clear"/><br />

                <%= Html.HiddenFor(model => model.LanguageID) %>
                <%= Html.HiddenFor(model => model.QuestionID) %>
                <%= Html.HiddenFor(model => model.AnswerID) %>
                <p>
                    <input type="submit" value="Lưu" />
                </p>
        <% } %>
        </div>
    </div>

    
    

    
    
    
</asp:Content>
